package com.dkm.ec.home.repository.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.dkm.base.core.helper.SpringHelper;
import com.dkm.base.db.persistence.dao.IQueryDao;
import com.dkm.biz.repository.AbstractRepository;
import com.dkm.ec.home.domain.HomeQa;
import com.dkm.ec.home.persistence.dao.HomeQaQueryDao;
import com.dkm.ec.home.persistence.entity.HomeQaPo;
import com.dkm.ec.home.repository.HomeQaRepository;

/**
 * 对象功能:问答 Repository接口的实现类
 * 开发公司:SKG.COM
 * 开发人员:颜超敏
 * 创建时间:2014-12-19 16:06:27
 */
@Repository
public class HomeQaRepositoryImpl extends AbstractRepository<String, HomeQaPo,HomeQa> implements HomeQaRepository{
	  
	@Resource
	private  HomeQaQueryDao homeQaQueryDao;

	public HomeQa newInstance() {
		HomeQaPo po = new HomeQaPo();
		HomeQa homeQa = SpringHelper.getBean(HomeQa.class);
		homeQa.setData(po);
		return homeQa;
	}

	public HomeQa newInstance(HomeQaPo po) {
		HomeQa homeQa = SpringHelper.getBean(HomeQa.class);
		homeQa.setData(po);
		homeQa.loadRels();
		return homeQa;
	} 
	
	@Override
	protected IQueryDao<String, HomeQaPo> getQueryDao() {
		return homeQaQueryDao;
	}
	
}
